package com.fpx.order.plat.bussiness.entity; 

public class BasePage {
	//_search=false&nd=1423399356078&rows=10&page=1&sidx=&sord=asc
	//-- 公共变量 --//
		public static final String ASC = "asc";
		public static final String DESC = "desc";
		/**
		 * 排序方式
		 */
		private String sord;
		/**
		 * 总记录数
		 */
		protected long totalCount = -1;
		/**
		 * 当前页
		 */
		private int page;
		/**
		 * 总页数
		 */
		private int pageSize;
		/**
		 * 开始行
		 */
		@SuppressWarnings("unused")
		private int startNo;
		/**
		 * 每页的行数
		 */
		private int rows;
		public String getSord()
		{
			return sord;
		}
		public void setSord(String sord)
		{
			this.sord = sord;
		}
		public long getTotalCount()
		{
			return totalCount;
		}
		public void setTotalCount(long totalCount)
		{
			this.totalCount = totalCount;
		}
		public int getPage()
		{
			return page;
		}
		public void setPage(int page)
		{
			this.page = page;
		}
		public int getPageSize()
		{
			pageSize=(int) (totalCount%rows==0?totalCount/rows:totalCount/rows+1);
			return pageSize;
		}
		public void setPageSize(int pageSize)
		{
			this.pageSize = pageSize;
		}
		public int getStartNo()
		{
			return (page-1)*rows;
		}
		public void setStartNo(int startNo)
		{
			this.startNo = startNo;
		}
		public int getRows()
		{
			return rows;
		}
		public void setRows(int rows)
		{
			this.rows = rows;
		}
		
		
		
}
